#include <stdio.h>

int bin_search(int arr[], int left, int right, int key);

int main() {
	int num[10];
	int i = 0;
	for (int i = 0; i < 10; i++) {
		scanf("%d", &num[i]);
	}
	int len = sizeof(num) / sizeof(num[0]);
	int left = 0, right = len;
	int key = 0;
	scanf("%d", &key);

	printf("%d", bin_search(num, left, right, key));

	return 0;
}

int bin_search(int arr[], int left, int right, int key) {
	while (right >= left) {
		int m = (left + right) / 2;
		if (arr[m] == key) {
			return m;
		} else if (arr[m] > key) {
			right = m - 1;
		} else {
			left = m + 1;
		}
	}
	return -1;
}